* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #e8f5e8, #d4edda);
  color: #333;
  line-height: 1.6;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 导航栏 */
.navbar {
  background: #2c5e1a;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000; /* 确保在最上层 */
}
.navbar h1 a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
}
.navbar ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.navbar a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.3s;
}
.navbar a:hover {
  color: #a8d5a2;
}

/* 英雄区域 */
.hero {
  text-align: center;
  padding: 5rem 2rem;
  background: url('https://picsum.photos/id/106/1600/600') center/cover fixed;
  color: white;
  position: relative;
  margin-top: 70px; /* 为固定导航留出空间 */
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1;
}
.hero > * {
  position: relative;
  z-index: 2;
}
.hero h2 { 
  font-size: 2.8rem; 
  margin-bottom: 1.5rem; 
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.hero p { 
  font-size: 1.3rem; 
  margin-bottom: 2.5rem; 
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: #ff6b35;
  color: white;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
  transition: all 0.3s;
}
.btn-primary:hover {
  background: #e05a2a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.btn-secondary {
  background: transparent;
  color: white;
  padding: 1rem 2.5rem;
  border: 2px solid white;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* 内容区 */
#content {
  flex: 1;
  padding: 2.5rem;
  background: white;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  margin-top: -30px;
  position: relative;
  box-shadow: 0 -5px 30px rgba(0,0,0,0.1);
  margin-top: 0; /* 移除负边距，让内容不被遮挡 */
  padding-top: 4rem; /* 增加顶部内边距 */
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  color: #2c5e1a;
  font-size: 2.2rem;
  font-weight: 600;
}

/* 茶园页面布局 */
.garden-layout {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.garden-panel, .action-panel {
  flex: 1;
  min-width: 300px;
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.garden-panel h3, .action-panel h3 {
  color: #2c5e1a;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.4rem;
}

/* 茶树显示 */
.tea-tree-display {
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
}
.tea-tree-display img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin: 0 auto;
  border: 3px solid #d4edda;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: transform 0.3s;
}
.tea-tree-display img:hover {
  transform: scale(1.05);
}
.tea-tree-display p {
  margin-top: 0.8rem;
  font-weight: 600;
  color: #2c5e1a;
  font-size: 1.1rem;
}

/* 进度条 */
.progress-bar {
  margin: 1.5rem 0;
}
.progress-bar label {
  display: block;
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: 500;
}
.bar-outer {
  width: 100%;
  height: 20px;
  background: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
.bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #8bc34a);
  border-radius: 10px;
  transition: width 0.3s ease;
}

/* 资源和库存 */
.resources, .inventory {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #e8f5e8;
  border-radius: 10px;
  border: 1px solid #c8e6c9;
}
.resources p, .inventory p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  color: #388e3c;
}

/* 操作按钮 */
.action-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  margin: 0.8rem 0;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.action-btn:hover:not(:disabled) {
  background: #388e3c;
  transform: translateY(-2px);
}
.action-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* 消息提示 */
.message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s;
}
.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}
.message {
  opacity: 1;
}

/* 制作工艺页面 */
.process-steps {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}
.step {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  text-align: center;
}
.step h3 {
  color: #2c5e1a;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}
.step p {
  color: #555;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.interactive-btn {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}
.interactive-btn:hover {
  background: #e05a2a;
}

/* 图像生成页面 */
.generate-container {
  max-width: 600px;
  margin: 0 auto;
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 15px;
}
.upload-area {
  border: 2px dashed #4caf50;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s;
}
.upload-area:hover {
  background: #e8f5e8;
}
.result-container {
  margin-top: 2rem;
  text-align: center;
}
.result-container img {
  max-width: 100%;
  border-radius: 10px;
  margin: 1rem 0;
}

/* 地址页面 */
.address-form {
  max-width: 600px;
  margin: 0 auto;
  background: #f8f9fa;
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.address-form input, .address-form select, .address-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  background: #2c5e1a;
  color: white;
  font-size: 0.95rem;
}

/* 响应式 */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
  }
  .hero {
    margin-top: 120px; /* 移动端导航更高 */
    padding: 3rem 1rem;
  }
  .hero h2 { font-size: 2.2rem; }
  .hero p { font-size: 1.1rem; }
  .cta-buttons { gap: 1rem; }
  .btn-primary, .btn-secondary {
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
  }
  #content {
    padding: 1.5rem;
    padding-top: 2rem;
  }
  .garden-layout {
    flex-direction: column;
  }
  .garden-panel, .action-panel {
    min-width: 100%;
  }
}